The present invention relates to a data processing method and apparatus and, in particular, discloses a Data Encoding Method and Apparatus (Centroid).
There is a general need for a print media scanning system that allows for high volumes of computer data to be stored on a simple print media, such as a card of simultaneously being a tolerated a high degree of corruption of when read by a scanning device. For example, the form of distribution can suffer a number of data corruption errors when the surface is scanned by a scanning device. The errors can include:
1. Dead pixel errors which are a result of reading the surface of the card with a linear CCD having a faulty pixel reader for a line thereby producing the same value for all points on the line.
2. Preferably, the system adopted can tolerate writing errors wherein text is written by the owner of the card on the surface. Such text writing errors are ideally tolerated by any scanning system scanning the card.
3. Various data errors on the surface of the card may rise and any scuffs or blotches should be tolerated by any system determining the information stored on the surface of the card.
4. A certain degree of xe2x80x9cplayxe2x80x9d exists in the insertion of the card into a card reader. This play can comprise a degree of rotation of the card when read by a card reader.
5. Further, the card reader is assumed to be driven past a CCD type scanner device by means of an electric motor. The electric motor may experience a degree of fluctuation which will result in fluctuations in the rate of transmission of the data across the surface of the CCD. These motor fluctuation errors should also be tolerated by the data encoding method on the surface of the card.
6. The scanner of the surface of the card may experience various device fluctuations such that the intensity of individual pixels may vary. Reader intensity variations should also be accounted for in any system or method implemented in the data contained on the surface of the current one.
Ideally, any scanning system should be able to maintain its accuracy in the presence of errors due to the above factors.
It is an object of the present invention to provide for a method of converting a scanned image comprising scanned pixels to a corresponding bitmap image, said method comprising the steps of, for each bit in the bitmap image;
a. determining an expected location in said scanned image of a current bit from the location of surrounding bits in said scanned image;
b. determining a likely value of said bit from the values at the locations of expected corresponding pixels in said scanned image;
c. determining a centroid measures of the centre of the centre of the expected intensity at the said expected location;
d. determining similar centroid measures for adjacent pixels surrounding said current bit in said scanned image and;
e. where said centroid measure is improved relative to said expected location, adjusting said expected location to be an adjacent pixel having an improved centroid measure.